package com.jia.demo02;

public class UserServiceProxy implements UserService {

    private UserServiceImpl userService;

    public void setUserService(UserServiceImpl userService) {
        this.userService = userService;
    }


    public void add() {
        log("add");
        userService.add();
    }

    public void delete() {
        log("delete");
        userService.delete();
    }

    public void update() {
        log("update");
        userService.update();
    }

    public void get() {
        log("get");
        userService.get();
    }

    public void log(String msg){
        System.out.println("[info] 添加了"+msg+"方法");
    }

}
